-
Notifications
You must be signed in to change notification settings - Fork 9
Regional file support #132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Sameer Shaikh <[email protected]>
* Suppport for featureflag via GetProfile Signed-off-by: Sameer Shaikh <[email protected]> * Suppport for featureflag via GetProfile Signed-off-by: Sameer Shaikh <[email protected]> * Suppport for featureflag via GetProfile Signed-off-by: Sameer Shaikh <[email protected]> * Suppport for featureflag via GetProfile Signed-off-by: Sameer Shaikh <[email protected]> --------- Signed-off-by: Sameer Shaikh <[email protected]>
🔴 Coverage decreased from [84.7111%] to [84.1889%] |
2 similar comments
🔴 Coverage decreased from [84.7111%] to [84.1889%] |
🔴 Coverage decreased from [84.7111%] to [84.1889%] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check my comments and do the changes accordingly
@@ -110,6 +111,11 @@ func (csiCS *CSIControllerServer) CreateVolume(ctx context.Context, req *csi.Cre | |||
return nil, commonError.GetCSIError(ctxLogger, commonError.InvalidParameters, requestID, err) | |||
} | |||
|
|||
if requestedVolume.Profile != nil && requestedVolume.Profile.Name == RFSProfile && !csiCS.Driver.rfsEnabled { | |||
err = fmt.Errorf("RFS Profile is not accessible, please allowlist it from VPC team and restart the VPC FILE CSI Driver") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This we need to enhance so that user will have proper action
} | ||
|
||
// validation zone and iops for 'rfs' profile | ||
if volume.VPCVolume.Profile != nil && volume.VPCVolume.Profile.Name == RFSProfile { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these code block can be optimised, we are checking Profile != nil again and again
iops, err = strconv.Atoi(value) | ||
if err != nil { | ||
err = fmt.Errorf("%v:<%v> invalid value", key, value) | ||
if len(value) != 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sure this code should be released only for 2.0 driver
iopsStr := value | ||
volume.Iops = &iopsStr | ||
} | ||
case Throughput: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throughput is only supported for rfs profile, looks code is not uniform somewhere we are checking profile and taking action and somewhere its not
|
||
err = session.GetVolumeProfileByName(RFSProfile) | ||
if err != nil { | ||
icDriver.rfsEnabled = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its not required to set false again
also warning msg need to improve like user don't have access to RFS profile so RFS share creation will not work, user need to be allowed for RFS profile from VPC IaaS team etc
No description provided.